<form method="POST">
    <input type="text" name="rating">
    <input type="text" name="rating1">
    <input type="submit" name="submit" value="Search">
</form>

<?php
$file_name = "../ptnhuan-web1/data/films.txt";
$films = array();
$file_part = realpath($file_name);
$file = fopen($file_part, "r");
$data = fgets($file);
while (!feof($file)) {
    $films [] = trim(fgets($file));
}
fclose($file);
?>
<?php foreach ($films as $line) : ?>
    <?php if (!empty($line)): ?>
        <?php $film = explode(";", $line); ?>
        <?php if (isset($_GET['uid'])): ?>
            <?php if ((int) $_GET['uid'] == (int) $film[4]): ?><br>
                <img src = 'public/Images/films/<?php echo $film[1] ?>'> 
                <?php echo $film[2] ?>
                <?php echo $film[3] ?>
                <?php echo $film[4] ?>
                <a href="edit.php?if= <?php echo $film[0] ?> ">Edit</a>
            <?php endif; ?> 
        <?php endif; ?> 
    <?php endif; ?> 
<?php endforeach; ?>   




